from wxauto import *
msg=('陈弈戈','没搞懂')
who = '风荷YYDS'
wx = WeChat()
wx.Search(keyword = who)
wx.ChatWith(who)
word={' ':'----------------开始----------',
      '你好':'你好','再见':'再会',
      '叫什么':'我叫ego','会啥':'我会聊天',
      '背诗':'白日依山尽，黄河入海流','傻逼':'这不礼貌',
      '呵':'我也应该笑吗？','是':'那挺好的',
      '百度百科':'船一锅没教我','hi':'hi','辣鸡':'大辣鸡'
      ,'心情不好':'别打我啊','新冠':'新冠sb大智障啊啊啊',
      '智障':'你才智障','船一锅':'他是我爹'}
da='你好'
wen='你好'
number=0
words=1
def ru(*ask):
    ask=ask=msgs[-1][1]
    return ask
def huida():
    try:
        wen=ru()
        words=list(word.keys())
        while (True):
            if (worlds[number])in(wen):
                da=word[words[number]]
                number=0
                return da
            elif number<=len(words):
                number=number+1
    except:
        return '不知道'
while True:
    msgs = wx.GetAllMessage
    if msgs[-1][:2] != msg:
        print(msgs[-1][:2],msg)
        wx.SendMsg(str(huida()))
        msg = msgs[-1][:2]
